<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Whisper: lcg.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Whisper
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">lcg.h</div>  </div>
</div>
<div class="contents">
<a href="lcg_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef __LCG_H__</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define __LCG_H__ 1</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;stdint.h&gt;</span>
<a name="l00005"></a>00005 
<a name="l00006"></a>00006 <span class="preprocessor">#include &quot;<a class="code" href="prng_8h.html">prng.h</a>&quot;</span>
<a name="l00007"></a>00007 
<a name="l00008"></a><a class="code" href="classCLcg.html">00008</a> <span class="keyword">class </span><a class="code" href="classCLcg.html">CLcg</a> : <span class="keyword">public</span> <a class="code" href="classIPrng.html">IPrng</a>
<a name="l00009"></a>00009 {
<a name="l00010"></a>00010 <span class="keyword">public</span>:
<a name="l00018"></a><a class="code" href="classCLcg.html#a902c69b7dfd3baf4fa0a99d7cee04c05">00018</a>     <a class="code" href="classCLcg.html#a902c69b7dfd3baf4fa0a99d7cee04c05">CLcg</a>(int16_t pSeed = <a class="code" href="classCLcg.html#a42af412cadd2742304b96f3d6bbd0500">sDefaultSeed</a>,
<a name="l00019"></a>00019             int16_t pMultiplier = <a class="code" href="classCLcg.html#aa4cb90fe9885e941136e5512fa8848b3">sDefaultMultiplier</a>,
<a name="l00020"></a>00020             int16_t pIncrement = <a class="code" href="classCLcg.html#a34b5e51f4cf1d76ceeeda64e50e88771">sDefaultIncrement</a>,
<a name="l00021"></a>00021             int16_t pModulo = <a class="code" href="classCLcg.html#a01310d87d833f60de8ffacf3db3bc881">sDefaultModulo</a>)
<a name="l00022"></a>00022             : <a class="code" href="classCLcg.html#aba57a019826333dea2bb61f4034fe746">mSeed</a>(pSeed),
<a name="l00023"></a>00023             <a class="code" href="classCLcg.html#aee4868aca2b5d4da589fe1f179507db4">mMultiplier</a>(pMultiplier),
<a name="l00024"></a>00024             <a class="code" href="classCLcg.html#a70208e9539b5142a639b8ad21290a08f">mIncrement</a>(pIncrement),
<a name="l00025"></a>00025             <a class="code" href="classCLcg.html#a412334c16d603d4473b448e7aa784a5d">mModulo</a>(pModulo) { }
<a name="l00026"></a><a class="code" href="classCLcg.html#a86cbed8cad62b0ce1194add1ba147c06">00026</a>     <span class="keyword">virtual</span> <a class="code" href="classCLcg.html#a86cbed8cad62b0ce1194add1ba147c06">~CLcg</a>() { }
<a name="l00027"></a>00027 
<a name="l00031"></a>00031     int16_t <a class="code" href="classCLcg.html#a3d0d9cba0dcd6692337cf30139729298">getRand</a>();
<a name="l00032"></a>00032 
<a name="l00033"></a>00033 <span class="keyword">private</span>:
<a name="l00034"></a><a class="code" href="classCLcg.html#a42af412cadd2742304b96f3d6bbd0500">00034</a>     <span class="keyword">const</span> <span class="keyword">static</span> int16_t <a class="code" href="classCLcg.html#a42af412cadd2742304b96f3d6bbd0500">sDefaultSeed</a> = 1;
<a name="l00035"></a><a class="code" href="classCLcg.html#aa4cb90fe9885e941136e5512fa8848b3">00035</a>     <span class="keyword">const</span> <span class="keyword">static</span> int16_t <a class="code" href="classCLcg.html#aa4cb90fe9885e941136e5512fa8848b3">sDefaultMultiplier</a> = 7;
<a name="l00036"></a><a class="code" href="classCLcg.html#a34b5e51f4cf1d76ceeeda64e50e88771">00036</a>     <span class="keyword">const</span> <span class="keyword">static</span> int16_t <a class="code" href="classCLcg.html#a34b5e51f4cf1d76ceeeda64e50e88771">sDefaultIncrement</a> = 5;
<a name="l00037"></a><a class="code" href="classCLcg.html#a01310d87d833f60de8ffacf3db3bc881">00037</a>     <span class="keyword">const</span> <span class="keyword">static</span> int16_t <a class="code" href="classCLcg.html#a01310d87d833f60de8ffacf3db3bc881">sDefaultModulo</a> = 29;
<a name="l00038"></a>00038     
<a name="l00039"></a><a class="code" href="classCLcg.html#aba57a019826333dea2bb61f4034fe746">00039</a>     int16_t <a class="code" href="classCLcg.html#aba57a019826333dea2bb61f4034fe746">mSeed</a>;
<a name="l00040"></a><a class="code" href="classCLcg.html#aee4868aca2b5d4da589fe1f179507db4">00040</a>     int16_t <a class="code" href="classCLcg.html#aee4868aca2b5d4da589fe1f179507db4">mMultiplier</a>;
<a name="l00041"></a><a class="code" href="classCLcg.html#a70208e9539b5142a639b8ad21290a08f">00041</a>     int16_t <a class="code" href="classCLcg.html#a70208e9539b5142a639b8ad21290a08f">mIncrement</a>;
<a name="l00042"></a><a class="code" href="classCLcg.html#a412334c16d603d4473b448e7aa784a5d">00042</a>     int16_t <a class="code" href="classCLcg.html#a412334c16d603d4473b448e7aa784a5d">mModulo</a>;
<a name="l00043"></a>00043 };
<a name="l00044"></a>00044 
<a name="l00045"></a>00045 <span class="preprocessor">#endif  </span><span class="comment">/* __LCG_H__ */</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Wed Jan 25 2012 22:00:39 for Whisper by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
